package com.t1.demo.Controller;

import com.t1.demo.Share.BorderInit;
import com.t1.demo.Share.Socket_Client;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @Description:
 * @Author: 杨淮尊
 * @Date: 2020/4/13
 **/
@RestController
@RequestMapping("/ScreanStudent")
public class StuController {

    @PostMapping
    public static void screanStu(@RequestBody Map map){
        //需要Socket端口和共享方IP两个参数
        Integer serverport =Integer.valueOf(map.get("SERVERPORT").toString());
        String ip =map.get("IP").toString();
        //调用Socket_Client
        BorderInit frame = new BorderInit(ip,serverport);
        new Socket_Client(frame,ip,serverport).start();
        System.out.println("学员端启动");
    }
}
